{minimum_otp_vsn, "20.1"}.

{erl_opts, [debug_info]}.

{escript_incl_apps, [aefate, aebytecode, lager, getopt]}.
{escript_main_app, aefate}.
{escript_name, aefate}.
{escript_emu_args, "%%! \n"}.

{provider_hooks, [{post, [{compile, escriptize}]}]}.

{pre_hooks, [
             {"(linux|darwin|solaris|freebsd|netbsd|openbsd)",
              compile,
              "make fate_eval ERL_LIBS=\"${REBAR_DEPS_DIR}:${REBAR_CHECKOUTS_DIR}\""},
             {"(win32)",
              compile,
              "make fate_eval ERL_LIBS=\"${REBAR_DEPS_DIR};${REBAR_CHECKOUTS_DIR}\""},
             {clean, "make clean"}
            ]}.

{post_hooks, [
              {"(linux|darwin|solaris|freebsd|netbsd|openbsd)",
               escriptize,
               "cp \"$REBAR_BUILD_DIR/bin/aefate\" ./aefate"},
              {"win32",
               escriptize,
               "robocopy \"%REBAR_BUILD_DIR%/bin/\" ./ aefatea* "
               "/njs /njh /nfl /ndl & exit /b 0"} % silence things
             ]}.

{dialyzer, [
            {warnings, [unknown]},
            {plt_apps, all_deps},
            {base_plt_apps, [erts, kernel, stdlib, crypto, getopt]}
           ]}.


{relx, [{release, {aefate, "0.0.1"},
         [aefate, aebytecode, getopt]},

        {dev_mode, true},
        {include_erts, false},

        {extended_start_script, true}]}.
